package com.example.treehole.entity;

import java.util.Map;

public class AnalyseResponse {

    private String code;
    private String msg;
    private DataDTO data;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public DataDTO getData() {
        return data;
    }

    public void setData(DataDTO data) {
        this.data = data;
    }

    public static class DataDTO {
        private String mark;
        private Map<Integer,Float> lineChartData;
        private Map<Integer,Float> pieChartData;

        public Integer getMark() {
            //传回来的数据如14.000000006，需要进行处理
            return Integer.parseInt(mark.split("\\.")[0]);
        }

        public void setMark(String mark) {
            this.mark = mark;
        }

        public Map<Integer, Float> getLineChartData() {
            return lineChartData;
        }

        public void setLineChartData(Map<Integer, Float> lineChartData) {
            this.lineChartData = lineChartData;
        }

        public Map<Integer, Float> getPieChartData() {
            return pieChartData;
        }

        public void setPieChartData(Map<Integer, Float> pieChartData) {
            this.pieChartData = pieChartData;
        }
    }
}
